package com.bytedance.common.b;

import android.annotation.TargetApi;
import android.os.Build;
import android.webkit.WebSettings;
import android.webkit.WebView;

public final class d {
    static class a {
        a(byte arg1) {
            this();
        }

        private a() {

        }

        public void a(WebView arg3, int arg4) {
            WebSettings.TextSize v0 = WebSettings.TextSize.NORMAL;
            if (arg4 == 3) {
                v0 = WebSettings.TextSize.LARGER;
            } else if (arg4 == 1) {
                v0 = WebSettings.TextSize.SMALLER;
            } else if (arg4 == 4) {
                v0 = WebSettings.TextSize.LARGEST;
            }

            arg3.getSettings().setTextSize(v0);
        }
    }

    @TargetApi(value = 14)
    static final class b extends a {
        b(byte arg1) {
            this();
        }

        private b() {
            super((byte) 0);
        }

        public final void a(WebView arg3, int arg4) {
            int v0 = 100;
            if (arg4 == 1) {
                v0 = 75;
            }

            if (arg4 == 3) {
                v0 = 125;
            }

            if (arg4 == 4) {
                v0 = 150;
            }

            arg3.getSettings().setTextZoom(v0);
        }
    }

    private static a a;

    static {
        d.a = Build.VERSION.SDK_INT >= 14 ? new b((byte) 0) : new a((byte) 0);
    }

    public static void a(WebView arg1, int arg2) {
        d.a.a(arg1, arg2);
    }
}

